home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
10,000 Great Games
/
10,000 Great Games.iso
/
Product
/
66
/
data1.cab
/
Source_Files
/
Src
/
Dripping.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2000-01-16
|
862b
|
52 lines
#include "stdafx.h"
cDripping::cDripping(int _x, int _y, cProperties *_orig)
: cScenery(_x, _y, _orig)
{
ASSERT(orig->spot != 0);
orig->get_sequence("MOVING", drip_seq);
set_sequence(drip_seq, FALSE);
}
cDripping::~cDripping()
{
}
int cDripping::control()
{
// Do nothing when in low detail mode
if (low_detail_level)
return TRUE;
// Control
cScenery::control();
// Check if we fell onto something
if (animation_done())
{
// Create drop
ASSERT(orig->spot != 0);
new cFallingScenery(x + orig->spot->x, y - orig->spot->y, water_drop);
// Make dripping sound
//new cEffect(x, y, orig, "DROP");
// Restart sequence
add_sequence(drip_seq);
// Set image delay for first image in sequence
set_image_delay(rnd(2 * sec));
}
return TRUE;
}